<template>
  <div>
    <Uediter :value="ueditor.value" :config="ueditor.config" ref="ue"></Uediter>
    <button @click="returnContent">显示编辑器内容</button>
    <div>{{dat.content}}</div>
  </div>
</template>
<script>
  import Uediter from '@/components/ueditor/UE.vue';
  export default {
    data () {
      return {
        dat: {
          content: ''
        },
        ueditor: {
          value: '编辑器默认文字',
          config: {
            initialFrameWidth: 800,
            initialFrameHeight: 320
          }
        }
      };
    },
    methods: {
      returnContent () {
        this.dat.content = this.$refs.ue.getUEContent();
      }
    },
    components: {
      Uediter
    }
  };
</script>
